package cn.net.yugu.doraemon.netty.protocol.msg08;

import cn.net.yugu.doraemon.netty.protocol.MsgCode;
import io.netty.buffer.ByteBuf;

public class Msg082000014 extends Msg082 {

    @Override
    public void writeTime(ByteBuf buffer) {
        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
        buffer.writeInt(Integer.parseInt(timestamp));
    }

    @Override
    public int getMsgCode() {
        return MsgCode.MSG_082000014.getCode();
    }

    @Override
    public void writeData(ByteBuf buffer) {
        writeRtn(buffer);
    }

    @Override
    public boolean checkCRC() {
        return true;
    }

    @Override
    public void readData(ByteBuf buffer) {
        readRtn(buffer);
    }
}
